package com.jackson.spring.beandemo.factory;

import java.util.HashMap;
import java.util.Map;

/**
 * 实例工厂方法：实例工厂的方法，即需要先创建实例本身，在调用工厂方法。
 * @author jackson
 *
 */
public class InstanceBeanFactory {

	private Map<String, Car> car = null;
	public InstanceBeanFactory(){
		car = new HashMap<String, Car>();
		car.put("aodi",new Car("red", 3000000, 150, "aodi"));
	}
	
	public Car getCar(String name){
		return car.get(name);
	}
}
